﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Exam.Core;

public partial class Manage_TeacherMasterPage : System.Web.UI.MasterPage {
    protected void Page_Load(object sender, EventArgs e) {

            StringBuilder sb = new StringBuilder();
            sb.Append("<td></td>");//<a href='../admin/default.aspx'>管理员</a>
            sb.Append("<td class='menuCurr'></td>");//培训师
            if (Cookie.GetCookie(ExamSys.teacher_cookiesname) == null || Cookie.GetCookie(ExamSys.teacher_cookiesname).Trim() == "") {
                sb.Append("<td> </td>");
            }
            else {
                sb.Append("<td>" + Resources.labels.welcome + ":" + Cookie.GetCookie(ExamSys.teacher_cookiesname).Trim().Split('|')[1] + " &nbsp;|&nbsp; <a href='../Login.aspx'>" + Resources.labels.Logout + "</a></td>");
            }
            ManageMasterMenu.Text = sb.ToString();


    }

    protected string getLeftMenuClass(string str){
        string result = "item";
        string url = Request.RawUrl.ToLower();
        if (url.Substring(url.LastIndexOf('/')).Contains(str)) {
            result = "currentLeft";
        }
        ;
        return result;
    }

    protected string url() {
        return Utils.AbsoluteWebRoot + "images/";
    }
}
